<html>
<head>
  <title>Column Layout</title>
  
  	<title>Complex Layout</title>
		<link rel="stylesheet" type="text/css"
			href="resources/styles/ext-all.css" />
			
			<link href="../resources/styles/ext-all.css" rel="stylesheet" type="text/css"/>
			<link href="../resources/styles/screen.css" rel="stylesheet" type="text/css" />


		<script type="text/javascript" src="./resources/scripts/ext-base.js"></script>
		<script type="text/javascript" src="./resources/scripts/ext-all.js"></script>
		<script type="text/javascript"
			src="./resources/scripts/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="./resources/scripts/examples.js"></script>
  
  
  
	<style type="text/css">
	html, body {
        font:normal 12px verdana;
        margin:0;
        padding:0;
        border:0 none;
        overflow:hidden;
        height:100%;
    }
	.x-panel-body p {
	    margin:5px;
	}
    .x-column-layout-ct .x-panel {
        margin-bottom:5px;
    }
    .x-column-layout-ct .x-panel-dd-spacer {
        margin-bottom:5px;
    }
    .settings {
        background-image:url(../shared/icons/fam/folder_wrench.png) !important;
    }
    .nav {
        background-image:url(../shared/icons/fam/folder_go.png) !important;
    }
    #container  {
    position: absolute;
    left: 3px;
    top: 7px;
    font-size: 1.5em;
    
    font-family: 宋体;
    color: #0754A7;
}
    </style>
    
    <script type="text/javascript" src="./resources/scripts/ext-base.js"></script>
	<script type="text/javascript" src="./resources/scripts/ext-all.js"></script>
	<script type="text/javascript" src="./resources/scripts/utils.js"></script>
	
    <script type="text/javascript">//tree
	Ext.BLANK_IMAGE_URL='resources/images/default/s.gif';
	Ext.onReady(function(){
    // shorthand
   var Tree = Ext.tree;
        var root=new Tree.TreeNode({
               id:'id',
               text:'Root',
               draggable:false //��������ק
                                      //icon:'im2.gif',//�Զ���ڵ�ͼ��

        });
        var node1=new Tree.TreeNode({
        	id:'1',
        	text:'客户管理'
        	});
        	
        	
       		
        var node2=new Tree.TreeNode({
        	id:'2',
        	text:'经理管理'
        	});
        var node21=new Tree.TreeNode(
	     	{id:'21', 
	     	 href:"./project/ManangeLayer.html",
	     	 hrefTarget:"fmain",
	     	 text:'经理工作台',
	     	 leaf:false}
	     	 ); 
        	
         var node3=new Tree.TreeNode({
        	id:'3',
        	text:'售后管理'
        	});	
        	
         var node31=new Tree.TreeNode(
     	{id:'111', 
     	 href:"./project/AfterService.html",
     	 hrefTarget:"fmain",
     	 text:'售后服务',
     	 leaf:false}
     	 ); 	
         node3.appendChild
      		 (    	[node31] )	;	
        	
        	
        	
         var node4=new Tree.TreeNode({
        	id:'4',
        	text:'合同管理'
        	});	
       var node41=new Tree.TreeNode(
     	{id:'222', 
     	 href:"./project/pact.html",
     	 hrefTarget:"fmain",
     	 text:'合同管理',
     	 leaf:false}
     	 ); 
        	 node4.appendChild(
        	[node41]);
        	
        	
        	
        var node5=new Tree.TreeNode({
        	id:'5',
        	text:'公告管理'
        	});
         var node51=new Tree.TreeNode(
	       	{id:'51',
	       	 href:"./meeting/meetingList.html",
	     	 hrefTarget:"fmain",
	       	text:'日报',
	       	leaf:false}
	       	);
       var node52=new Tree.TreeNode(
	       {id:'52',
	        href:"./task/taskAdd.html",
	     	 hrefTarget:"fmain",
	       text:'消息寻呼',
	       leaf:true}
	       );
	    var node53=new Tree.TreeNode(
	       {id:'53',
	       hrefTarget:"fmain",
	       text:'公司通告',
	       leaf:true}
	       );	
        node5.appendChild(
        	[
        	//node51,node52
        	node53
        	]);	
        	
        var node6=new Tree.TreeNode({
        	id:'6',
        	text:'资料下载'
        	});	
         var node61=new Tree.TreeNode(
	       {id:'62',
	        href:"./supervise/issue_report.html",
	      hrefTarget:"fmain",
	       text:'资料下载',
	       leaf:true}
	       );	
        	node6.appendChild(
        	[   	node61
            	]);	
            	
        	
        	
        var node7=new Tree.TreeNode({
        	id:'7',
        	text:'未约信息'
        	});	
         var node71=new Tree.TreeNode(
	       {id:'71',
	        href:"./project/UnknownMessage.html",
	     	 hrefTarget:"fmain",
	       text:'未约寻呼',
	       leaf:true}
	       );	
        	node7.appendChild(
        	[   	node71
            	]);		
        	
        //����г�t�ӵ�Ҷ��   // hrefTarget:'_blank'   �´��ڴ�t��   hrefTarget:"mainFrame",


     var node11=new Tree.TreeNode(
     	{id:'11', 
     	 href:"./project/customer.html",
     	 hrefTarget:"fmain",
     	 text:'个人工作台',
     	 leaf:false}
     	 ); 
     var node12=new Tree.TreeNode(
     	{id:'12', 
     	 href:"./project/NewCustomer.html",
     	 hrefTarget:"fmain",
     	 text:'个人工作台-2',
     	 leaf:false}
     	 );  
   
    
     	 
   //  <a href="#"  onclick="javascript:openf('./project/customer.html');return true;">
       node1.appendChild
       (
       	[node11,node12]
       	)
       	;
       	
       //���һ��Ҷ��
      
       
       var node23=new Tree.TreeNode(
       {id:'23',
        href:"./project/Message.html",
     	 hrefTarget:"fmain",
       text:'下载专区',
       leaf:true}
       );
       
        
               
        node2.appendChild(
        	[
        	node21
        	
        	]);
        	
        	
        	
    var node8=new Tree.TreeNode({
               id:'8',
               text:'系统管理-参数设置'              
               });
          
               
      var node401=new Tree.TreeNode(
       {id:'401',
        href:"./project/SystemParameters.html",
     	 hrefTarget:"fmain",
       text:'用户设置',
       leaf:true}
       );          
         var node402=new Tree.TreeNode(
       {id:'402',
        href:"./project/BusinessParameters.html",
     	 hrefTarget:"fmain",
       text:'部门设置',
       leaf:true}
       ); 
       var node403=new Tree.TreeNode(
       {id:'403',
        href:"./project/Role.html",
     	 hrefTarget:"fmain",
       text:'角色设置',
       leaf:true}
       );         	
         var node405=new Tree.TreeNode(
       {id:'405',
        href:"./project/ModifyPassword.html",
     	 hrefTarget:"fmain",
       text:'修改密码',
       leaf:true}
       ); 
         var node404=new Tree.TreeNode(
       {id:'404',
       text:'密码修改',
        //href:"./project/Permission.html",
        href:"./project/ModifyPassword.html",
       
        hrefTarget:"fmain",
       leaf:true}
       );	
        	
        node8.appendChild(
        	[node401,
        	node402,
        	node403,
        	node404
        	]);
        	
        var node9=new Tree.TreeNode({
               id:'9',
               text:'公告管理'              
               }); 	
        var node10=new Tree.TreeNode({
               id:'10',
               text:'销售管理'              
               });
        var node101=new Tree.TreeNode(
     	{id:'101', 
     	 href:"./project/customer.html",
     	 hrefTarget:"fmain",
     	 text:'个人工作台',
     	 leaf:false}
     	 );
     	 var node201=new Tree.TreeNode(
	     	{id:'201', 
	     	 href:"./project/ManangeLayer.html",
	     	 hrefTarget:"fmain",
	     	 text:'经理工作台',
	     	 leaf:false}
	     	 ); 
          var node501=new Tree.TreeNode(
	       	{id:'501',
	       	 href:"./meeting/meetingList.html",
	     	 hrefTarget:"fmain",
	       	text:'日报',
	       	leaf:false}
	       	);
	       var node401=new Tree.TreeNode(
     		{id:'401', 
     	 	href:"./project/pact.html",
     	 	hrefTarget:"fmain",
     	 	text:'合同管理',
     	 	leaf:false}
     	 	); 
	       var node601=new Tree.TreeNode(
	       {id:'601',
	        href:"./supervise/issue_report.html",
	      hrefTarget:"fmain",
	       text:'资料下载',
	       leaf:true}
	       );	       
          node10.appendChild([
          	node101,node201,node401,node501,node601
          
          ]);      	       
        
         var node20=new Tree.TreeNode({
               id:'20',
               text:'消息管理'              
               });
        
         var node202=new Tree.TreeNode(
	       {id:'202',
	       	 href:"./task/taskAdd.html",
	     	 hrefTarget:"fmain",
	      	 text:'消息寻呼',
	      	 leaf:true}
	       );	
         node20.appendChild([
         	node202
         ]);
        root.appendChild([
        //node1,node2,
        //node3,
        //node4,node5,node6,
        //node7,
        //node8
		node5,node10 ,node8  ,     node20
        ]);
        var treePanel=new Tree.TreePanel({
                 el:'sidebar',
                 useArrows:false,
                 autoScroll:true,
                 animate:true,
                 enableDD:true,
                //�Ƿ���ʾ��ڵ� rootVisible:false,111
                 containerScroll: true});
        treePanel.setRootNode(root);
        treePanel.render();
        root.expand();
});
   </script>
    
<script type="text/javascript">
 	timerID = setInterval("count()",30000);
	function count() {
		Utils.request('./security/getMsg.form', {
			params: {},
			success: function(resp, action) {
				if (!resp || !resp.success) return;
				var span = Ext.get('msgInfo');
				var msgCount=resp.msgCount;
				var label="<a href='./task/taskAdd.html' target='_blank'>"+msgCount+"条寻呼</a>";
				span.update(label);
			}
		});
	
	}
  Ext.onReady(function(){
    
     	Utils.request('./security/getSessionUser.form', {
			params: {},
			success: function(resp, action) {
				if (!resp || !resp.success) return;
				var span = Ext.get('userInfo');
				var user=resp.user;
				var label='id:'+user.id+', 登陆id:'+user.userId+', 用户名:'+user.userName+' 部门名:'+user.branchName;
				span.update(label);
			}
		});
		
		Utils.request('./security/getMsg.form', {
			params: {},
			success: function(resp, action) {
				if (!resp || !resp.success) return;
				var span = Ext.get('msgInfo');
				var msgCount=resp.msgCount;
				var label="<a href='./task/taskAdd.html'>"+msgCount+"条寻呼</a>";
				span.update(label);
			}
		});
		
        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());
        
        var viewport = new Ext.Viewport({
            layout: 'border',
            items: [
            // create instance immediately
            new Ext.BoxComponent({
                region: 'north',
                height: 50, // give north and south regions a height
                autoEl: {
                    tag: 'div',
                    html:''
                }
            }),  {
                region: 'west',
                id: 'west-panel', // see Ext.getCmp() below
                title: '导航条',
                split: true,
                width: 200,
                minSize: 175,
                maxSize: 400,
                collapsible: true,
                margins: '0 0 0 5',
                layout: {
                    type: 'accordion',
                    animate: true
                }
                , items: [{
                contentEl: 'west',
                TreePanel:'treePanel'
                
                }]
         //       , items: [{}]
            },
            // in this instance the TabPanel is not wrapped by another panel
            // since no title is needed, this Panel is added directly
            // as a Container
            new Ext.TabPanel({
                region: 'center', // a center region is ALWAYS required for border layout
                deferredRender: false,
                activeTab: 0,     // first tab initially active
                items: [{
                    contentEl: 'center2',
                    title: '菜单',
                    
                    autoScroll: true
                }]
            })]
        });
        // get a reference to the HTML element with id "hideit" and add a click listener to it 
        Ext.get("hideit").on('click', function(){
            // get a reference to the Panel that was created with id = 'west-panel' 
            var w = Ext.getCmp('west-panel');
            // expand or collapse that Panel based on its collapsed property state
            w.collapsed ? w.expand() : w.collapse();
        });
    });
    </script>


</head>
<body>
<div id="container">
<div class="subtitle">
用户信息：<span id="userInfo"></span><br>
我的寻呼：<span id="msgInfo"></span>
</div>
</div> 


 <div id="west" class="x-hide-display"> 
      
 <div id="sidebar" style="overflow:auto; height:100%;width:280px; solid #c3daf9;"></div>
    <div id="center2" class="x-hide-display">
    	<iframe id="fmain" name="fmain" scrolling="auto"  align="middle" frameborder="0" width="100%" height="100%"  src=""></iframe>
    
  
          </div>
    <div id="center1" class="x-hide-display">
        <p><b>Done reading me? Close me by clicking the X in the top right corner.</b></p>
     </div>
    <div id="props-panel" class="x-hide-display" style="width:200px;height:200px;overflow:hidden;">
    </div>
    <div id="south" class="x-hide-display">
        <p>south - generally for informational stuff, also could be for status bar</p>
    </div>
</div>


  </body>
</html>
